Memristors can be organized in large arrays to build dense non-volatile memory (NVM). A write operation places the memristor into a known state, establishing a read margin. Two memristance states can be used to represent logic 0 and logic 1, called the low resistive state (LRS) and high resistive state (HRS), respectively.